package Operation;
import Book.Book;
import Book.BookList;
import java.util.Scanner;
public class Returnoperation implements Interface{
    @Override
    public void work(BookList bookList) {
        System.out.println("输入你要借阅的图书的书名：");
        Scanner scanner = new Scanner(System.in);
        String book = scanner.nextLine();
        int Quantity = bookList.getQuantity();
        for (int i = 0; i < Quantity; i++) {
            Book book1 = bookList.getpoi(i);
            if (book.equals(book1.getName())) {
                    book1.setLend(false);
                    break;
                }
        }
        System.out.println("已归还图书");
    }
}
